weight = float(input("请输入行李重量（千克）："))
if weight < 20:
    print("免费托运")
elif 20 <= weight <= 30:
    fee = (weight - 20) * 5
    print(f"托运费为：{fee} 元")
elif 30 < weight <= 40:
    fee = 10 * 5 + (weight - 30) * 10
    print(f"托运费为：{fee} 元")
elif 40 < weight <= 50:
    fee = 10 * 5 + 10 * 10 + (weight - 40) * 15
    print(f"托运费为：{fee} 元")
else:
    print("50千克以上不允许个人携带")